package pratice;

import java.util.HashMap;

public class Petcount {
static class PetCounter extends HashMap<String, Integer>{
	public void count(String type){
		Integer quantity=get(type);
		if(quantity==null){
			put(type, 1);
		}else{
			put(type, quantity+1);
		}
	}
}
}
